﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Schemes.aspx.cs" Inherits="TestJQGrid.Management.MasterTables.Schemes" %>

<%@ Register Assembly="Trirand.Web" Namespace="Trirand.Web.UI.WebControls" TagPrefix="trirand" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <title></title>
    <!-- The jQuery UI theme that will be used by the grid -->
    <link rel="stylesheet" type="text/css" media="screen" href="../../themes/redmond/jquery-ui-1.8.2.custom.css" />
    <!-- The jQuery UI theme extension jqGrid needs -->
    <link rel="stylesheet" type="text/css" media="screen" href="../../themes/ui.jqgrid.css" />
    <!-- jQuery runtime minified -->
    <script src="../../js/jquery-1.4.4.min.js" type="text/javascript"></script>
    <!-- The localization file we need, English in this case -->
    <script src="../../js/trirand/i18n/grid.locale-en.js" type="text/javascript"></script>
    <!-- The jqGrid client-side javascript -->
    <script src="../../js/trirand/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script src="../../js/trirand/jquery.jqDatePicker.min.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table border="1">
        <tr>
            <td align="center" valign="middle">
                <asp:Label ID="Label2" runat="server" Text="Schemes Master" Font-Size="Medium"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <trirand:JQGrid runat="server" ID="JQGrid1" DataSourceID="SqlDataSource1" Height="300px"
                    Width="890px">
                    <Columns>
                        <trirand:JQGridColumn DataField="SchemeName" PrimaryKey="True" Editable="true" />
                        <trirand:JQGridColumn DataField="ProductName" PrimaryKey="True" Editable="true" />
                    </Columns>
                    <SearchDialogSettings MultipleSearch="True" />
                    <ToolBarSettings ShowAddButton="true" ShowSearchButton="True" ShowViewRowDetailsButton="True" />
                    <AppearanceSettings ShowRowNumbers="True" ShrinkToFit="false" />
                    <SearchDialogSettings MultipleSearch="True"></SearchDialogSettings>
                </trirand:JQGrid>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                    SelectCommand="SELECT [SchemeName], [ProductName] FROM [Schemes]" DeleteCommand="DELETE FROM [Schemes] WHERE [SchemeName] = @SchemeName AND [ProductName] = @ProductName"
                    InsertCommand="INSERT INTO [Schemes] ([SchemeName], [ProductName]) VALUES (@SchemeName, @ProductName)">
                    <DeleteParameters>
                        <asp:Parameter Name="SchemeName" Type="String" />
                        <asp:Parameter Name="ProductName" Type="String" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="SchemeName" Type="String" />
                        <asp:Parameter Name="ProductName" Type="String" />
                    </InsertParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td align="center" valign="middle" style="height: 10%;">
                <asp:Label ID="Label1" runat="server" Enabled="False" Text="Download As" Width="100px"
                    Visible="false" />
                <asp:DropDownList ID="DDLDownloadType" runat="server" Visible="false">
                    <asp:ListItem Selected="True" Value="0">Excel</asp:ListItem>
                    <asp:ListItem Value="1">CSV (,)</asp:ListItem>
                    <asp:ListItem Value="2">CSV (|)</asp:ListItem>
                    <asp:ListItem Value="3">PDF</asp:ListItem>
                    <asp:ListItem Value="4">MS WORD</asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="BDownload" runat="server" Text="Download" OnClick="BDownload_Click"
                    Visible="false" />
            </td>
        </tr>
    </table>
</asp:Content>
